package service.impl;


import dao.SmbmsProviderDao;
import dao.impl.SmbmsProviderDaoImpl;
import pojo.SmbmsProvider;
import service.SmbmsProviderService;


import java.util.List;

public class SmbmsProviderServiceImpl implements SmbmsProviderService {
    //dao层
    private SmbmsProviderDao smbmsProviderDao=new SmbmsProviderDaoImpl();

    //查询所有并支持模糊查询
    @Override
    public List<SmbmsProvider> queryList(String proName) throws Exception {
        return smbmsProviderDao.queryProviderByProName(proName);
    }
    //通过id查询所有信息
    @Override
    public SmbmsProvider queryProviderById(Long id) throws Exception {
        return smbmsProviderDao.queryProviderById(id);
    }
    //修改操作
    @Override
    public int updateProvider(SmbmsProvider smbmsProvider) throws Exception {
        return smbmsProviderDao.updateProvider(smbmsProvider);
    }

    //增加
    @Override
    public int addProvider(SmbmsProvider smbmsProvider) throws Exception {
        return smbmsProviderDao.addProvider(smbmsProvider);
    }
    //删除
    @Override
    public int deleteProvider(Long id) throws Exception {
        return smbmsProviderDao.deleteProvider(id);
    }

    @Override
    public List<SmbmsProvider> queryPronName() throws Exception {
        return smbmsProviderDao.queryPronName();
    }

}

